﻿@model AgileZen.Models.Story

@{
    ViewBag.Title = "Details";
}

<h2>Details</h2>
<p>
   
    @Html.Partial("_StoryMenu",Model)
</p>
<fieldset>
    <legend>Story</legend>

    <div class="display-label">Text</div>
    <div class="display-field">@Model.Text</div>

    <div class="display-label">Size</div>
    <div class="display-field">@Model.Size</div>

    <div class="display-label">Color</div>
    <div class="display-field">@Model.Color</div>

    <div class="display-label">Ready</div>
    <div class="display-field">@Model.Ready</div>

    <div class="display-label">Blocked</div>
    <div class="display-field">@Model.Blocked</div>

    <div class="display-label">PhaseIndex</div>
    <div class="display-field">@Model.PhaseIndex</div>

    <div class="display-label">Details</div>
    <div class="display-field">@Model.Details</div>

    <div class="display-label">Tasks |  
    @Html.ActionLink("Add Task", "AddTask", new { id=Model.Id, projectId = Int32.Parse(Request.QueryString["projectid"]) }) |
    @Html.ActionLink("Reorder", "Reorder", "Task", new { storyid = Model.Id, projectId = Int32.Parse(Request.QueryString["projectid"]) }, null)
  </div>
    <div class="display-field">
    @foreach (var task in Model.Tasks)
    { 
        <span>@Html.ActionLink("Edit Task", "EditTask", new { storyid = Model.Id, projectId = Int32.Parse(Request.QueryString["projectid"]), id = task.Id }) </span>
        <span>@Html.ActionLink(task.Text, "Index","Task", new { storyid = Model.Id, projectId = Int32.Parse(Request.QueryString["projectid"]), id = task.Id },null) </span>
        <span>@Html.ActionLink("Delete Task", "DeleteTask", new { id = Model.Id, projectId = Int32.Parse(Request.QueryString["projectid"]), taskid = task.Id }) </span><br />   
    }
    </div>
</fieldset>
<p>
    @Html.ActionLink("Edit", "Edit", new { id = Model.Id }) |
    @Html.ActionLink("Back to List", "Index")
</p>

